package com.itcm.manage.controller;

import com.itcm.manage.common.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author sky
 * @Site cmtianxie163.com 2020/6/18 10:45
 */
@CrossOrigin
@RestController
@RequestMapping("/manage/brand")
public class PmsBrandController {
    @GetMapping("/listAll")
    @ApiOperation("测试方法权限")
    @PreAuthorize("hasAuthority('pms:brand:read')")
    public R listAll(){
        return R.ok().message("欢迎来到商品管理页面");
    }
}
